<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>BrightVision CMS</title>
<link rel="stylesheet" href="<?php echo $this->TEMPLATE_DIR; ?>resources/stylesheets/cmssheet.css" type="text/css" />
<!--[if lt IE 7]>
<script defer type="text/javascript" src="<?php echo $this->TEMPLATE_DIR; ?>resources/scripts/pnfgix.js"></script>
<![endif]-->
</head>
<body>
<div align="center">
	<div id="wrap"> 
    	<div id="head">
        	<div class="right"><a href="?action=Logout"><img src="<?php echo $this->TEMPLATE_DIR; ?>resources/images/icons/logout.png" /></a></div>
        </div>
        <div id="main">
        	<div class="contentTop"></div>
            	<div class="content">
            		<div class="top">
                    	<div class="left"><p>Velkommen tilbage, <?php echo $this->user->get('username'); ?></p></div>
                        <div class="right"><p><a href="?action=Logout">Log ud</a></p></div>
                    </div>
                    <div class="mid">
                    	<p><a href="?action=Index">Forside</a> > <a href="?action=Modules">Moduler</a> > Statistik</p>
                        <table align="center" cellpadding="15" class="tableMenu">
                            <tr valign="top">
                            	<td align="left">
                            		
                            		<table cellpadding='5' cellspacing='0' style='border: 1px solid black;'>
                            			<tr>
                            				<td style='border-bottom: 1px solid black;'>#</td>
                            				<td style='border-bottom: 1px solid black;'>Titel</td>
                            				<td style='border-bottom: 1px solid black;'>Prioritet</td>
                            				<td style='border-bottom: 1px solid black;'>Aktiv</td>
                            				<td style='border-bottom: 1px solid black;'>Muligheder</td>
                            			</tr>
                            			
                            			<?php
                            			
                            			foreach($this->data as $row)
                            			{
	                            			$local	= $row['c_title'] ? true : false;
											
											$title	= $row['c_title'] ? $row['c_title'] : "Ikke-lokalt link";
											$active	= $row['m_active'] == "true" ? "Ja" : "Nej";
											$id		= $row['c_id'] ? $row['c_id'] : "-1";
											
											$edit = $local ? "<a href=\"?action=Modules&module=CA_Content&do=edit&id={$id}\">Rediger</a>" : "<del>Rediger</del>";
											
											$url	= ($local ? "../" : "") . $row['m_url'];
											
											echo "<tr>";
											echo "<td style='border-bottom: 1px dotted gray;'><input type=\"checkbox\" name='p[$id]'>";
											echo "<td style='border-bottom: 1px dotted gray;'>{$title} (<a href=\"{$url}\">{$row['m_title']}</a>)</td>";
											echo "<td style='border-bottom: 1px dotted gray;'>{$row['m_priority']}</td>";
											echo "<td style='border-bottom: 1px dotted gray;'>{$active}</td>";
											echo "<td style='border-bottom: 1px dotted gray;'>{$edit}</td>";
											echo "</tr>";
                            			}
                            			
                            			?>
                            			
                            		</table>
                            		<a href="#" id='deletemarked'>Slet markerede linier</a> - <a href="#" id='deactivatemarked'>Deaktivér markerede linier</a> - <a href="#" id='deactivatemarked'>Opdatér</a>
                            	</td>
                            </tr>
                        </table>
                    </div>
                </div>
            <div class="contentBot"></div>
      </div>
        <div id="foot">
        	<p>BrightVision I/S | Henrik Ibsens Vej 32, 1813 Frederiksberg C | +45 36 96 78 57 | <a href="mailto:info@brightvision.dk">info@brightvision.dk</a></p>
        </div>
    </div>
</div>
</body>
</html>
